#include<stdio.h>
#include<stdlib.h>
#define MAX 100
typedef struct node *stack;

struct node{
    int data[MAX];
    int top;
};

stack s;

void Push(stack s,int dat){
  
    (s->top)++;
    
    s->data[s->top] = dat;
  

}


stack GetBinary(stack s,int data){
    int ret;
    while(data){
        ret=data%2;
        Push(s,ret);
         
        data/=2;
    }

    return s;


}

int main(){
    FILE *fp,*fo;
    fp = fopen("in.txt", "r");
    fo = fopen("out.txt", "w");
    int cnt=0;
    fscanf(fp,"%d",&cnt);
    while(cnt!=-1){
        //结构体指针一定需要malloc
        s=(stack)malloc(sizeof(struct node));
     
        s ->top = -1;
       
        s=GetBinary(s,cnt);
        fprintf(fo,"%d-->",cnt);
        for(int i=s->top;i>=0;i--){
            fprintf(fo,"%d",s->data[i]);  
        }
        fprintf(fo,"%\n"); 
         
        fscanf(fp,"%d",&cnt);

    }
    fclose(fp);
    fclose(fo);
    

}